﻿
var __GlobalInfo = {
    "webroot": "http://192.168.1.119:8080/DSFA",
    "postUrl": "http://192.168.1.119:8080/DSFA/doPost"
};

function replaceString(str) {
    str = str.toLowerCase();
    for (var key in __GlobalInfo) {
        var word = "{%" + key + "}"
        if (str.indexOf(word) >= 0) {
            str = str.replace(word, __GlobalInfo[key]);
        }
    }
    return str;
}